package com.gm.census.model.pojo;

import java.util.Date;

import javax.persistence.Id;

import org.codehaus.jackson.annotate.JsonIgnore;
import org.codehaus.jackson.map.annotate.JsonSerialize;

import com.gm.census.jackson.DateSerializer;
import com.googlecode.objectify.Key;
import com.googlecode.objectify.annotation.Parent;
import com.googlecode.objectify.annotation.Unindexed;

public class Ask {

	@Id
	Long id;
	@Unindexed
	String name;
	String email;
	@Unindexed
	String congregation;
	@Unindexed
	String phone;
	@Unindexed
	String message;
	@JsonSerialize(using = DateSerializer.class)
	@Unindexed
	Date timestamp;
	@Parent
	@JsonIgnore
	Key<String> parent;

	public Ask() {
	}

	public Ask(Long id) {
		this.id = id;
	}

	public String getName() {
		return name;
	}
	public void setName(String name) {
		this.name = name;
	}

	public String getEmail() {
		return email;
	}

	public void setEmail(String email) {
		this.email = email;
	}

	public String getCongregation() {
		return congregation;
	}

	public void setCongregation(String congregation) {
		this.congregation = congregation;
	}

	public String getPhone() {
		return phone;
	}

	public void setPhone(String phone) {
		this.phone = phone;
	}

	public Long getId() {
		return id;
	}

	public void setId(Long id) {
		this.id = id;
	}

	public String getMessage() {
		return message;
	}

	public void setMessage(String message) {
		this.message = message;
	}

	public Date getTimestamp() {
		return timestamp;
	}

	public void setTimestamp(Date timestamp) {
		this.timestamp = timestamp;
	}

	@JsonIgnore
	public Key<String> getParent() {
		return parent;
	}

	public void setParent(Key<String> parent) {
		this.parent = parent;
	}

}
